import request from "../request"
//登录
function login(data){
    return request({
        url:"/user/login",
        params:data
    })
}

//获取所有用户
function getAllUsers(){
    return request({
        url:"/user/findall",
    })
}

//新增用户
function addUser(data){
    return request({
        url:"/user/add",
        method:"post",
        data
    })
}


//删除
function delUser(data){
    return request({
        url:"/user/del",
        method:"post",
        //data:data简写
        data
    })
}

function delUsers(data){
    return request({
        url:"/user/delUsers",
        method:"post",
        data
    })
}

function updateUser(data){
    return request({
        url:"/user/update",
        method:"post",
        data
    })

}



export default{
    login,
    getAllUsers,
    delUser,
    delUsers,
    updateUser,
    addUser
    
}